﻿using housingsafety.server.Repository;
using NetTopologySuite.Geometries;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace housingsafety.server.Models
{
    [Table("zm_yt_build")]
    public class ZmYtBuild : Repository.IEntity
    {
        [Key]
        [Column("id")]
        public string Id { get; set; }
        /// <summary>
        /// 区id
        /// </summary> 
        [Column("district_id")]
        [StringLength(255)]
        public string? DistrictId { get; set; }
        /// <summary>
        /// 区
        /// </summary>
        [Column("district_name")]
        [StringLength(255)]
        public string? DistrictName { get; set; }
        /// <summary>
        /// 街道id
        /// </summary>
        [Column("street_id2021")]
        [StringLength(255)]
        public string? StreetId2021 { get; set; }
        /// <summary>
        /// 街道名称
        /// </summary>
        [Column("street_name")]
        [StringLength(255)]
        public string? StreetName { get; set; }
        /// <summary>
        /// 幢编码（这个是唯一的）
        /// </summary>
        [Required]
        [Column("build_no")]
        [StringLength(255)]
        public string BuildNo { get; set; }
        /// <summary>
        /// 楼名称
        /// </summary>
        [Column("build_name")]
        [StringLength(255)]
        public string? BuildName { get; set; }
        /// <summary>
        /// 楼坐落
        /// </summary>
        [Column("build_site")]
        [StringLength(255)]
        public string? BuildSite { get; set; }
        /// <summary>
        /// 产权人
        /// </summary>
        [Column("ownername")]
        [StringLength(255)]
        public string? Ownername { get; set; }
        /// <summary>
        /// 地上层数
        /// </summary>
        [Column("upfloors")]
        public short? Upfloors { get; set; }
        /// <summary>
        /// 建成年份
        /// </summary>
        [Column("jcnd")]
        public short? Jcnd { get; set; }
        /// <summary>
        /// 用途
        /// </summary>
        [Column("room_design_use_name")]
        [StringLength(255)]
        public string? RoomDesignUseName { get; set; }
        /// <summary>
        /// 是否老旧小区改造
        /// </summary>
        [Column("sfljxjgz")]
        public short? Sfljxjgz { get; set; }

        [Column("create_by")]
        [StringLength(50)]
        public string CreateBy { get; set; }
        [Column("create_on", TypeName = "timestamp(6) without time zone")]
        public DateTime CreateOn { get; set; }
        [Column("create_ip")]
        [StringLength(20)]
        public string? CreateIp { get; set; }
        [Column("modified_by")]
        [StringLength(50)]
        public string? ModifiedBy { get; set; }
        [Column("modified_on", TypeName = "timestamp(6) without time zone")]
        public DateTime? ModifiedOn { get; set; }
        [Column("modified_ip")]
        [StringLength(20)]
        public string? ModifiedIp { get; set; }
        [Column("is_delete")]
        public short? IsDelete { get; set; }
        [Column("delete_by")]
        [StringLength(50)]
        public string? DeleteBy { get; set; }
        [Column("delete_on", TypeName = "timestamp(6) without time zone")]
        public DateTime? DeleteOn { get; set; }
        [Column("delete_ip")]
        [StringLength(20)]
        public string? DeleteIp { get; set; }

        [Column("pczt")]
        public int? Pczt { get; set; }

        [Column("balcony_count")]
        public int? BalconyCount { get; set; }

        [Column("submit_unit")]
        [StringLength(255)]

        public string? SubmitUnit { get; set; }


        [Column("is_danger")]
        [StringLength(255)]
        public short? isDanger { get; set; }



        [Column("numyhwt_yt")]
        [StringLength(255)]
        public short? NumYhWtYt { get; set; }

        [Column("geos")]
        public string geos { get; set; }


    }
}
